package cn.k.service.impl;


import cn.k.mapper.ConsumptionReportMapper;
import cn.k.qo.ConsumptionReportQueryObject;

import cn.k.service.IConsumptionReportService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service
public class ConsumptionReportServiceImpl implements IConsumptionReportService {

      @Autowired
      private ConsumptionReportMapper mapper;

    @Override
    public PageInfo<Map<String,Object>> query(ConsumptionReportQueryObject qo) {

        PageHelper.startPage(qo.getCurrentPage(),qo.getPageSize());
        List<Map<String, Object>> maps = mapper.selectForList(qo);

        return new PageInfo(maps) ;
    }
}
